package com.blt.govdata.controller;

import com.blt.govdata.service.IStatisticsService;
import com.google.common.collect.ImmutableMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * <p>
 * 数据统计前端控制器
 * </p>
 * @author AustinGJ123
 * @since 2018-03-27
 */
@RestController
@RequestMapping(value = "/statistics")
public class StatisticsController {

    @Autowired
    private IStatisticsService service;

    /**
     * 项目类型统计——三大项目类型，t_project下面property字段；
     */
    @RequestMapping("/projectPropertyCount")
    public Map<String,Object> projectPropertyCount(@RequestParam Map<String,Object> params){


        return ImmutableMap.of("status", "true", "data",this.service.projectPropertyCount(params));


    }


    @RequestMapping("/projectFinishStatusCount")
    public Map<String,Object> projectFinishStatusCount(@RequestParam Map<String,Object> params){

        return ImmutableMap.of("status", "true", "data",this.service.projectFinishStatusCount(params));



    }





    @RequestMapping("/projectInvestmentCount")
    public Map<String,Object> projectInvestmentCount(@RequestParam Map<String,Object> params){

        return ImmutableMap.of("status", "true", "data",this.service.projectInvestmentCount(params));



    }


    @RequestMapping("/projectIsImportantCount")
    public Map<String,Object> projectIsImportantCount(@RequestParam Map<String,Object> params){

        return ImmutableMap.of("status", "true", "data",this.service.projectIsImportantCount(params));



    }








}
